<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- <script src="https://unpkg.com/axios/dist/axios.min.js"></script> -->
    <script src="./myAxios.js"></script>
    <title>Document</title>
</head>
<body>
    <button class="btn">点我发送请求</button>


    <script>
        document.querySelector('.btn').onclick = function() {
            // axios.post('https://www.fastmock.site/mock/ac202f79c7d23cb09a6ca1ea7bef2290/postAxios/postAxios', {
            //     name: '宝狮post'
            // }).then(res => {
            //     console.log('postAxios响应成功', res);
            // })

            axios({
                method: 'post',
                url:'https://www.fastmock.site/mock/ac202f79c7d23cb09a6ca1ea7bef2290/postAxios/postAxios'
            }).then(res => {
                console.log('postAxios响应成功', res);
            })
        }

        
    </script>
</body>
</html>